import QtQuick 2.0

Item {
    property alias text: label.text
    property alias source: image.source
    signal clicked

    id: root
    // 基于列的子矩形
    width: container.childrenRect.width
    height: container.childrenRect.height

    Column {
        id: container
        Image {
            id: image
            source: "assets/ufo.png"
        }
        Text {
            id: label
            width: image.width
            horizontalAlignment: Text.AlignHCenter
            wrapMode: Text.WordWrap
            color: "#111111"
            text: qsTr("Hello World")
        }
    }
    MouseArea {
        anchors.fill: parent
        onClicked: root.clicked()
    }
}
